Image pattern recognition refers to the study of automated systems and processes designed to recognize patterns in image data. Pattern recognition detectors are useful for a variety of applications, including automated inspection of objects and controlling the operation of machines.
One important application of pattern recognition is in imaging devices to detect documents or images of a particular type and controlling the operation of the imaging device based on detection of a particular pattern. Preferably, a pattern recognition detector in these applications must be efficient and use minimal memory so as to not interfere with the normal flow of image processing in the imaging device.
This document describes methods and related software for recognizing image patterns in images. These methods are particularly adapted for efficiently detecting object patterns in image data streams received from an image scanner or sent to a printer from an application program in a personal computing system. These detector methods are also adapted for implementation in software drivers for printers and scanners. The detector is used to detect an image pattern associated with a particular type of document, such as a secure document including identification documents and bank notes. For these types of documents, the detector may be used to inhibit scanning or printing of the document, and/or trigger other usage control operations. The detector operates effectively on low resolution images, and minimizes the use of memory by temporally storing and operating on only small groups of scan line bands at a time. This enables the detector to operate on a stream of image data being sent to printer or intercepted from a scanner as the image is being printed or scanned. As such, the detector does not add significant processing complexity or memory requirements to the printing or scanning process. Also, by acting on an image stream during image capture or printing, actions taken in response to detecting a target object pattern can be taken before printing or scanning of an entire document is complete. In addition, the detector can be implemented as part of an operating system, device driver or other program, and can be used to scan digital image files, e.g., when a file is opened. While the methods are adapted for device control within printing and scanning environments, they may be used for other applications as well.
One aspect of the invention is a method for image pattern recognition for detecting an object in an image stream. The method temporarily stores a group of scan lines in the image stream, and transforms image pixels in the scan lines to a space in which the target object is detected. This transforming of the image includes, but is not limited to a color space transformation. The method detects a candidate pattern in the space of the transformed pixels, analyzes the candidate pattern to determine whether the candidate pattern satisfies predetermined criteria associated with the target object being sought, and controls use of the image stream based on a result of analyzing the candidate patterns.
Another aspect of the invention is a method for image pattern recognition for detecting an object in an image. This method detects a candidate size relevant shape in the image, and performs edge tracing of the candidate size relevant shape to determine whether the candidate satisfies predetermined shape criteria. The edge tracing includes performing a water spreading method to trace a boundary of the candidate size relevant shape. This water spreading may include water filling or water draining to trace the boundary of the object.
Further features of the invention will become apparent with reference to the following detailed description and accompanying drawing.